#include "student.h"

Student::Student()
{

}

Student::Student(QString num, QString name, QString major, QString Class, size_t bookNum)
{
    this->stu_number=num;
    this->stu_name=name;
    this->stu_major= major;
    this->stu_class=Class;
    this->stu_bookNum=bookNum;
}

Student::Student(QStringList strlist)
{
    this->stu_number=strlist[0];
    this->stu_name=strlist[1];
    this->stu_major= strlist[2];
    this->stu_class=strlist[3];
    this->stu_bookNum=strlist[4].toInt();
}

QStringList Student::getStudent()
{
    QStringList ret;
    ret.append(this->stu_number);
    ret.append(this->stu_name);
    ret.append(this->stu_major);
    ret.append(this->stu_class);
    ret.append(QString::number(this->stu_bookNum));
    return ret;
}
